package com.yonyou.pmclouds.workstopreport.process;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.copyperson.entity.CopyPersonVO;
import com.yonyou.pmclouds.copyperson.rmiitf.ICopyPersonMaintain;
import com.yonyou.pmclouds.workstopreport.entity.WorkStopVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class WorkStopCopyPersonInsertBatchProcessor implements SingleProcessor<WorkStopVO> {

    @Autowired
    private ICopyPersonMaintain copyPersonMaintain;

    @Override
    public void process(WorkStopVO vo, WorkStopVO orig) throws BusinessException {
        List<CopyPersonVO> copyPersonVOList = vo.getCopyPersonVOList();
        if(null != copyPersonVOList && copyPersonVOList.size() > 0){
            copyPersonMaintain.insertBatch(vo.getCopyPersonVOList());
        }else{
            //do nothing
        }
    }
}




